package com.dq.Week1.day02;

import java.util.Scanner;

public class discountDemo {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int integral = 0;
        double money = 0;
        double sell;
        System.out.println("请输入您的积分");
        integral = scanner.nextInt();
        System.out.println("请输入您购买需要的原价");
        money = scanner.nextDouble();
        int discount;

        if (integral < 2000) {
            discount = 9;
        } else if (integral >= 2000 && integral < 4000) {
            discount = 8;
        } else if (integral >= 4000 && integral < 8000)
        {
            discount = 7;
        }else {
            discount = 6;
        }


                sell = money*0.1*discount ;
        System.out.println("享受折扣："+discount+"折");
        System.out.println("金额为："+sell);

    }
}
